package com.youan.serve.controller.swagger;

import com.youan.pangu.security.bean.LoginInfor;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import java.util.List;
import com.youan.serve.dao.domain.Email;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
/**
* <p>
    *  swagger接口描述文件
    * </p>
*
* @author auto_code
* @since 2020-03-10
*/
@Api(tags = "Email管理接口")
@Validated
public interface EmailControllerSwagger {

    @ApiOperation(value = "新增一个Email实例")
    Email addEmail(@Validated Email email, LoginInfor loginInfor);

    @ApiOperation(value = "修改一个Email实例")
    Email updateEmail(@Validated Email email);

    @ApiOperation(value = "获取所有Email实例")
    List<Email> selectAllEmail();

    @ApiOperation(value = "根据主键删除一个Email实例")
    void deleteEmailByEmailId(@NotBlank  String emailId);

    @ApiOperation(value = "根据主键获取Email实例")
    Email selectEmailByEmailId(@NotBlank  String emailId);

    @ApiOperation(value = "获取接收的邮件信息")
    List<Email> selectEmailsBySendUserId(LoginInfor loginInfor) throws Exception;

    @ApiOperation(value = "获取发送的邮件信息")
    List<Email> selectEmailsByReceiveUserId(LoginInfor loginInfor) throws Exception;

    @ApiOperation(value = "获取删除的邮件信息")
    List<Email> selectEmailsByReceiveUserIdWithDeleted(LoginInfor loginInfor) throws Exception;

    @ApiOperation(value = "将一个邮件标记为删除")
    void deleteEmail(@PathVariable String emailId);

    @ApiOperation(value = "将一个标记为删除的邮件还原")
    void rebackEmail(@PathVariable String emailId);
}

